<!--<h2><%?heading%></h2>-->
<%form%>
<table class='panel' width='100%'>
  <%?caption%>
  <%?colgroup%>
  <tr>	<%?label_server_project_id%>	<%?field_server_project_id%>	</tr>
  <tr>	<%?label_title%>				<%?field_title%>				</tr>
  <tr>	<%?label_status%>				<%?field_status%>				</tr>
  <tr>	<%?label_started%>				<%?field_started%>				</tr>
  <tr>	<%?label_modified%>				<%?field_modified%>				</tr>
  <tr>	<%?label_finished%>				<%?field_finished%>				</tr>
  <tr>	<%?label_description%>			<%?field_description%>			</tr>
  <tr>	<%field_button_cancel%>			<%?field_button_edit%>			</tr>
</table>
<style>
select.status0, option.status0 {
	background-color: lightblue;
	}
select.status1, option.status1 {
	background-color: lightgreen;
	}
select.status2, option.status2 {
	background-color: yellow;
	}
select.status3, option.status3 {
	background-color: orange;
	}
select.status4, option.status4 {
	background-color: red;
	}
select.status5, option.status5 {
	background-color: green;
	}
</style>

<script>
$("#edit_run_status option").each(function(){
  value=$(this).attr('value');
  switch(value){
    case '0': $(this).addClass('status0'); break;
    case '1': $(this).addClass('status1'); break;
    case '2': $(this).addClass('status2'); break;
    case '3': $(this).addClass('status3'); break;
    case '4': $(this).addClass('status4'); break;
    case '5': $(this).addClass('status5'); break;
    default: alert(value); break;
  }
});
$("#edit_run_status").each(function(){
  $(this).addClass($("option[@selected]",this).attr('class'));
});
</script>
</form>